package com.topisv.tms.repository.work.outScope;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import com.topisv.tms.entity.work.outScope.OutScope;

/**
 * 超区件配置_DAO
 * @author ch
 *
 */
public abstract interface OutScopeDao extends PagingAndSortingRepository<OutScope, Long>, JpaSpecificationExecutor<OutScope>
{

	@Query("select t from OutScope t where t.companyCode=? and t.warehouseCode=? order by t.zoneFullName")
	List<OutScope> loadByCompanyCode(String companyCode,String warehouseCode);

	@Query("select t from OutScope t where t.companyCode=? and t.zoneFullName=? and t.warehouseCode=? ")
	OutScope loadByZoneFullName(String companyCode,String zoneFullName,String warehouseCode);
}